#include "../common/Socket.hpp"
#include <string>

int main()
{
    init_logger(false, "", 0);
    Socket sock;
    sock.create_client_socket("127.0.0.1", 8080);
    std::string str = "hello server";
    
    int a = 3;
    while (a--)
    {
        sock.send(str.c_str(), str.size());
        char buffer[1024] = {0};
        sock.recv(buffer, 1023);
        std::cout << buffer << std::endl;
        sleep(1);
    }



    sleep(20);
    sock.close();
    return 0;
}